DEFINITION MODULE OutTerminal; (* ETHZ Modula2 Compiler 1985 *)

(* contains formatting number output routines*)
(* taken from the Lilith Handbook  13.1.1984 P. Fink *)

FROM SYSTEM IMPORT WORD, ADDRESS;

EXPORT QUALIFIED WriteT, WriteI,WriteB, WriteC, WriteH,
                 WriteAC, WriteAH, dumphex;

PROCEDURE WriteT (VAR s: ARRAY OF CHAR; length: CARDINAL);
PROCEDURE WriteI (value: INTEGER; length: CARDINAL);
PROCEDURE WriteB (value: BOOLEAN; length: CARDINAL);
PROCEDURE WriteC (value: CARDINAL; length: CARDINAL);
PROCEDURE WriteH (value: WORD; length: CARDINAL);

PROCEDURE WriteAC (value: ADDRESS; length: CARDINAL);
PROCEDURE WriteAH (value: ADDRESS; length: CARDINAL);

PROCEDURE dumphex
   (VAR title: ARRAY OF CHAR;
        start: ADDRESS; length: CARDINAL; printadr: ADDRESS; linelength: CARDINAL);
 (* Hex+Ascii Dump routine: dumps from start to start+length-1.
    title   is printed as title.  printadr:  first value to be printed at the left margin.
    linelength: number of hex bytes per line. a 80-char terminal accommodates 12 *)

END OutTerminal.
